#!/bin/sh

# Fix the setuid bits on our background tools
chown root:wheel /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/install_scripts
chmod u+s /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/install_scripts
chown root:wheel /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/remove_scripts
chmod u+s /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/remove_scripts
chown root:wheel /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/install_crontab
chmod u+s /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/install_crontab
chown root:wheel /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/manual_backup
chmod u+s /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/manual_backup
chown root:wheel /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/archive_table
chmod u+s /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/archive_table
chown root:wheel /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/abort_backup
chmod u+s /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/abort_backup

# Fix directory ownerships/permissions
chown root:admin /Library
chmod 775 /Library /Library/PreferencePanes /Library/PreferencePanes/DejaVu.prefPane
chmod 775 /Library/PreferencePanes/DejaVu.prefPane/Contents/Resources/*.scpt

# Make sure the pref panes cache gets updated
touch /Library/PreferencePanes

# Give them a clue where to find Deja Vu
#open /Library/PreferencePanes/DejaVu.prefPane
